/*
 * Feat.h
 *
 *  Created on: Jan 1, 2009
 *      Author: sez
 */

#ifndef FEAT_H_
#define FEAT_H_

#include "DndData.h"
#include "TitledData.h"

#include <QString>

class Feat : public TitledData
{
public:
	enum FeatType
	{
		STANDARD_FEAT,
		CLASS_FEAT,
		DIVINITY_FEAT,
		MULTICLASS_FEAT,
		RACIAL_FEAT
	};

	static const int NUM_FEAT_TYPES = 5;
	static const char *FEAT_TYPE_NAMES[];

	Feat(const QString &title = QString());
	Feat(const Feat &rhs);
	virtual ~Feat();
	QString description() const;
	void saveToXml() const;
	void loadFromXml();
	Feat &operator=(const Feat &rhs);

	DndData::Tier tier;
	QString prerequisites;
	QString benefits;
	QString special;
	FeatType type;
	DndData::RaceName raceName;
        QString extRace;
	DndData::ClassName className;
        QString extClassName;
};

QTextStream & operator>>(QTextStream &s, Feat::FeatType &data);



#endif /* FEAT_H_ */
